Filename | (eval 1147)[/usr/lib/perl5/Template/Document.pm:78] |
Statements | Executed 4 statements in 7µs |
Eval Invoked At | /usr/lib/perl5/Template/Document.pm line 78 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8 |
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | sub { | ||||
2 | 1 | 1µs | my $context = shift || die "template sub called without context\n"; | ||
3 | 1 | 5µs | 1 | 6µs | my $stash = $context->stash; # spent 6µs making 1 call to Template::Context::stash |
4 | 1 | 700ns | my $output = ''; | ||
5 | 1 | 300ns | my $_tt_error; | ||
6 | |||||
7 | eval { BLOCK: { | ||||
8 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
9 | if (($stash->get('opacfacets'))) { | ||||
10 | $output .= " "; | ||||
11 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
12 | if (($stash->get('facets_loop'))) { | ||||
13 | $output .= " <div id=\"search-facets\">\n<h4>Refine your search</h4>\n<ul>\n <li id=\"availability_facet\">Availability<ul><li>"; | ||||
14 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
15 | if (($stash->get('available'))) { | ||||
16 | $output .= "Showing only <strong>available</strong> items. <a href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
17 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
18 | |||||
19 | # FILTER | ||||
20 | $output .= do { | ||||
21 | my $output = ''; | ||||
22 | my $_tt_filter = $context->filter('html') | ||||
23 | || $context->throw($context->error); | ||||
24 | |||||
25 | $output .= $stash->get('query_cgi'); | ||||
26 | |||||
27 | &$_tt_filter($output); | ||||
28 | }; | ||||
29 | |||||
30 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
31 | $output .= $stash->get('limit_cgi_not_availablity'); | ||||
32 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
33 | if (($stash->get('sort_by'))) { | ||||
34 | $output .= "&sort_by="; | ||||
35 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
36 | |||||
37 | # FILTER | ||||
38 | $output .= do { | ||||
39 | my $output = ''; | ||||
40 | my $_tt_filter = $context->filter('html') | ||||
41 | || $context->throw($context->error); | ||||
42 | |||||
43 | $output .= $stash->get('sort_by'); | ||||
44 | |||||
45 | &$_tt_filter($output); | ||||
46 | }; | ||||
47 | |||||
48 | } | ||||
49 | |||||
50 | $output .= "\">Show all items</a>"; | ||||
51 | } | ||||
52 | else { | ||||
53 | $output .= "Limit to <a href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
54 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
55 | |||||
56 | # FILTER | ||||
57 | $output .= do { | ||||
58 | my $output = ''; | ||||
59 | my $_tt_filter = $context->filter('html') | ||||
60 | || $context->throw($context->error); | ||||
61 | |||||
62 | $output .= $stash->get('query_cgi'); | ||||
63 | |||||
64 | &$_tt_filter($output); | ||||
65 | }; | ||||
66 | |||||
67 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
68 | |||||
69 | # FILTER | ||||
70 | $output .= do { | ||||
71 | my $output = ''; | ||||
72 | my $_tt_filter = $context->filter('html') | ||||
73 | || $context->throw($context->error); | ||||
74 | |||||
75 | $output .= $stash->get('limit_cgi'); | ||||
76 | |||||
77 | &$_tt_filter($output); | ||||
78 | }; | ||||
79 | |||||
80 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
81 | if (($stash->get('sort_by'))) { | ||||
82 | $output .= "&sort_by="; | ||||
83 | #line 4 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
84 | |||||
85 | # FILTER | ||||
86 | $output .= do { | ||||
87 | my $output = ''; | ||||
88 | my $_tt_filter = $context->filter('html') | ||||
89 | || $context->throw($context->error); | ||||
90 | |||||
91 | $output .= $stash->get('sort_by'); | ||||
92 | |||||
93 | &$_tt_filter($output); | ||||
94 | }; | ||||
95 | |||||
96 | } | ||||
97 | |||||
98 | $output .= "&limit=available\">currently available items.</a>"; | ||||
99 | } | ||||
100 | |||||
101 | $output .= "</li></ul>\n "; | ||||
102 | #line 5 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
103 | if (($stash->get('related'))) { | ||||
104 | $output .= " <li>(related searches: "; | ||||
105 | #line 5 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
106 | |||||
107 | # FOREACH | ||||
108 | do { | ||||
109 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
110 | my $_tt_list = $stash->get('related'); | ||||
111 | |||||
112 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
113 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
114 | || die $Template::Config::ERROR, "\n"; | ||||
115 | } | ||||
116 | |||||
117 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
118 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
119 | $stash->set('loop', $_tt_list); | ||||
120 | eval { | ||||
121 | FOR1: while (! $_tt_error) { | ||||
122 | $stash->{'relate'} = $_tt_value; | ||||
123 | #line 5 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
124 | $output .= $stash->get(['relate', 0, 'related_search', 0]);; | ||||
125 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
126 | } | ||||
127 | }; | ||||
128 | $stash->set('loop', $_tt_oldloop); | ||||
129 | die $@ if $@; | ||||
130 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
131 | die $_tt_error if $_tt_error; | ||||
132 | }; | ||||
133 | |||||
134 | $output .= ")</li>"; | ||||
135 | } | ||||
136 | |||||
137 | $output .= " </li>\n \n"; | ||||
138 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
139 | |||||
140 | # FOREACH | ||||
141 | do { | ||||
142 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
143 | my $_tt_list = $stash->get('facets_loop'); | ||||
144 | |||||
145 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
146 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
147 | || die $Template::Config::ERROR, "\n"; | ||||
148 | } | ||||
149 | |||||
150 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
151 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
152 | $stash->set('loop', $_tt_list); | ||||
153 | eval { | ||||
154 | FOR1: while (! $_tt_error) { | ||||
155 | $stash->{'facets_loo'} = $_tt_value; | ||||
156 | $output .= " <li id=\""; | ||||
157 | #line 7 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
158 | $output .= $stash->get(['facets_loo', 0, 'type_id', 0]); | ||||
159 | $output .= "\">\n"; | ||||
160 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
161 | if (($stash->get(['facets_loo', 0, 'type_label_Authors', 0]))) { | ||||
162 | $output .= "Authors"; | ||||
163 | } | ||||
164 | |||||
165 | $output .= " "; | ||||
166 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
167 | if (($stash->get(['facets_loo', 0, 'type_label_Titles', 0]))) { | ||||
168 | $output .= "Titles"; | ||||
169 | } | ||||
170 | |||||
171 | $output .= " "; | ||||
172 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
173 | if (($stash->get(['facets_loo', 0, 'type_label_Topics', 0]))) { | ||||
174 | $output .= "Topics"; | ||||
175 | } | ||||
176 | |||||
177 | $output .= " "; | ||||
178 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
179 | if (($stash->get(['facets_loo', 0, 'type_label_Places', 0]))) { | ||||
180 | $output .= "Places"; | ||||
181 | } | ||||
182 | |||||
183 | $output .= " "; | ||||
184 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
185 | if (($stash->get(['facets_loo', 0, 'type_label_Series', 0]))) { | ||||
186 | $output .= "Series"; | ||||
187 | } | ||||
188 | |||||
189 | $output .= " "; | ||||
190 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
191 | if (($stash->get(['facets_loo', 0, 'type_label_ItemTypes', 0]))) { | ||||
192 | $output .= "Item types"; | ||||
193 | } | ||||
194 | |||||
195 | $output .= " "; | ||||
196 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
197 | if (!(($stash->get('singleBranchMode')))) { | ||||
198 | $output .= " "; | ||||
199 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
200 | if (($stash->get(['facets_loo', 0, 'type_label_Libraries', 0]))) { | ||||
201 | $output .= "Libraries"; | ||||
202 | } | ||||
203 | |||||
204 | $output .= " "; | ||||
205 | } | ||||
206 | |||||
207 | $output .= " "; | ||||
208 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
209 | if (($stash->get(['facets_loo', 0, 'type_label_Location', 0]))) { | ||||
210 | $output .= "Locations"; | ||||
211 | } | ||||
212 | |||||
213 | $output .= " <ul>\n "; | ||||
214 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
215 | |||||
216 | # FOREACH | ||||
217 | do { | ||||
218 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
219 | my $_tt_list = $stash->get(['facets_loo', 0, 'facets', 0]); | ||||
220 | |||||
221 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
222 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
223 | || die $Template::Config::ERROR, "\n"; | ||||
224 | } | ||||
225 | |||||
226 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
227 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
228 | $stash->set('loop', $_tt_list); | ||||
229 | eval { | ||||
230 | FOR2: while (! $_tt_error) { | ||||
231 | $stash->{'facet'} = $_tt_value; | ||||
232 | $output .= "<li><a href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
233 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
234 | |||||
235 | # FILTER | ||||
236 | $output .= do { | ||||
237 | my $output = ''; | ||||
238 | my $_tt_filter = $context->filter('html') | ||||
239 | || $context->throw($context->error); | ||||
240 | |||||
241 | $output .= $stash->get('query_cgi'); | ||||
242 | |||||
243 | &$_tt_filter($output); | ||||
244 | }; | ||||
245 | |||||
246 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
247 | |||||
248 | # FILTER | ||||
249 | $output .= do { | ||||
250 | my $output = ''; | ||||
251 | my $_tt_filter = $context->filter('html') | ||||
252 | || $context->throw($context->error); | ||||
253 | |||||
254 | $output .= $stash->get('limit_cgi'); | ||||
255 | |||||
256 | &$_tt_filter($output); | ||||
257 | }; | ||||
258 | |||||
259 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
260 | if (($stash->get('sort_by'))) { | ||||
261 | $output .= "&sort_by="; | ||||
262 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
263 | |||||
264 | # FILTER | ||||
265 | $output .= do { | ||||
266 | my $output = ''; | ||||
267 | my $_tt_filter = $context->filter('html') | ||||
268 | || $context->throw($context->error); | ||||
269 | |||||
270 | $output .= $stash->get('sort_by'); | ||||
271 | |||||
272 | &$_tt_filter($output); | ||||
273 | }; | ||||
274 | |||||
275 | } | ||||
276 | |||||
277 | $output .= "&limit="; | ||||
278 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
279 | $output .= $stash->get(['facet', 0, 'type_link_value', 0]); | ||||
280 | $output .= ":"; | ||||
281 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
282 | $output .= $stash->get(['facet', 0, 'facet_link_value', 0]); | ||||
283 | $output .= "\" title=\""; | ||||
284 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
285 | |||||
286 | # FILTER | ||||
287 | $output .= do { | ||||
288 | my $output = ''; | ||||
289 | my $_tt_filter = $context->filter('html') | ||||
290 | || $context->throw($context->error); | ||||
291 | |||||
292 | $output .= $stash->get(['facet', 0, 'facet_title_value', 0]); | ||||
293 | |||||
294 | &$_tt_filter($output); | ||||
295 | }; | ||||
296 | |||||
297 | $output .= "\">"; | ||||
298 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
299 | $output .= $stash->get(['facet', 0, 'facet_label_value', 0]); | ||||
300 | $output .= "</a> "; | ||||
301 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
302 | if (($stash->get('displayFacetCount'))) { | ||||
303 | $output .= "("; | ||||
304 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
305 | $output .= $stash->get(['facet', 0, 'facet_count', 0]); | ||||
306 | $output .= ")"; | ||||
307 | } | ||||
308 | |||||
309 | $output .= "</li>";; | ||||
310 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
311 | } | ||||
312 | }; | ||||
313 | $stash->set('loop', $_tt_oldloop); | ||||
314 | die $@ if $@; | ||||
315 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
316 | die $_tt_error if $_tt_error; | ||||
317 | }; | ||||
318 | |||||
319 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
320 | if (($stash->get(['facets_loo', 0, 'expandable', 0]))) { | ||||
321 | $output .= " <li class=\"showmore\"><a href=\"/cgi-bin/koha/opac-search.pl?"; | ||||
322 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
323 | |||||
324 | # FILTER | ||||
325 | $output .= do { | ||||
326 | my $output = ''; | ||||
327 | my $_tt_filter = $context->filter('html') | ||||
328 | || $context->throw($context->error); | ||||
329 | |||||
330 | $output .= $stash->get('query_cgi'); | ||||
331 | |||||
332 | &$_tt_filter($output); | ||||
333 | }; | ||||
334 | |||||
335 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
336 | |||||
337 | # FILTER | ||||
338 | $output .= do { | ||||
339 | my $output = ''; | ||||
340 | my $_tt_filter = $context->filter('html') | ||||
341 | || $context->throw($context->error); | ||||
342 | |||||
343 | $output .= $stash->get('limit_cgi'); | ||||
344 | |||||
345 | &$_tt_filter($output); | ||||
346 | }; | ||||
347 | |||||
348 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
349 | if (($stash->get('sort_by'))) { | ||||
350 | $output .= "&sort_by="; | ||||
351 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
352 | |||||
353 | # FILTER | ||||
354 | $output .= do { | ||||
355 | my $output = ''; | ||||
356 | my $_tt_filter = $context->filter('html') | ||||
357 | || $context->throw($context->error); | ||||
358 | |||||
359 | $output .= $stash->get('sort_by'); | ||||
360 | |||||
361 | &$_tt_filter($output); | ||||
362 | }; | ||||
363 | |||||
364 | } | ||||
365 | |||||
366 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
367 | if (($stash->get('offset'))) { | ||||
368 | $output .= "&offset="; | ||||
369 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
370 | $output .= $stash->get('offset'); | ||||
371 | } | ||||
372 | |||||
373 | $output .= "&expand="; | ||||
374 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
375 | $output .= $stash->get(['facets_loo', 0, 'expand', 0]); | ||||
376 | $output .= "#"; | ||||
377 | #line 9 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
378 | $output .= $stash->get(['facets_loo', 0, 'type_id', 0]); | ||||
379 | $output .= "\">Show more</a></li>\n"; | ||||
380 | } | ||||
381 | |||||
382 | $output .= " </ul></li>\n";; | ||||
383 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
384 | } | ||||
385 | }; | ||||
386 | $stash->set('loop', $_tt_oldloop); | ||||
387 | die $@ if $@; | ||||
388 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
389 | die $_tt_error if $_tt_error; | ||||
390 | }; | ||||
391 | |||||
392 | $output .= " </ul>\n</div>\n"; | ||||
393 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
394 | if (($stash->get('OPACResultsSidebar'))) { | ||||
395 | $output .= " <div id=\"opacresultssidebar\">\n"; | ||||
396 | #line 14 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc" | ||||
397 | $output .= $stash->get('OPACResultsSidebar'); | ||||
398 | $output .= " </div>\n"; | ||||
399 | } | ||||
400 | |||||
401 | $output .= " "; | ||||
402 | } | ||||
403 | |||||
404 | $output .= " "; | ||||
405 | } | ||||
406 | |||||
407 | $output .= " "; | ||||
408 | } }; | ||||
409 | if ($@) { | ||||
410 | $_tt_error = $context->catch($@, \$output); | ||||
411 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
412 | } | ||||
413 | |||||
414 | return $output; | ||||
415 | } | ||||
416 | |||||
417 | ; |